package tools;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import view.ViewOc_Station_PLA;

import entitybean.oc_station_pla.EntityBeanOc_Station_Pla;;

public class InterfaceStationPlaList {
	public List<ViewOc_Station_PLA> ViewOc_News(ResultSet rs)
	{
		
		List<ViewOc_Station_PLA>list =new ArrayList<ViewOc_Station_PLA>();
		try {
			Integer i=1;
			while(rs.next())
			{
				
				ViewOc_Station_PLA viewoc_sea_area=new ViewOc_Station_PLA();
				viewoc_sea_area.setId(i.toString());
				viewoc_sea_area.setKey(rs.getString("ID"));
				viewoc_sea_area.setDepth(rs.getString("DEPTH"));
				viewoc_sea_area.setDimensionality(rs.getString("DIMENSIONALITY"));
				viewoc_sea_area.setLongitude(rs.getString("LONGITUDE"));
				viewoc_sea_area.setOc_sea_area(rs.getString("OC_SEA_AREA"));
				viewoc_sea_area.setOc_voyage_id(rs.getString("OC_VOYAGE_ID"));
				viewoc_sea_area.setStation_name(rs.getString("STATION_NAME"));
				viewoc_sea_area.setTerritorial_waters(rs.getString("TERRITORIAL_WATERS"));
				viewoc_sea_area.setVoyage_name(rs.getString("VOYAGE_NAME"));
				viewoc_sea_area.setWork_time(rs.getString("WORK_TIME"));
				list.add(viewoc_sea_area);
				i=i+1;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return list;
		
	}
}
